# ****************************************************************************

# >  python receiver.py
import socket
import json


# This port number should match the AFSIM input file
addr = ("localhost", 19242)
s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM)
s.bind(addr)

target_address = ("127.0.0.1", 19241)


#发送数据
print ('start send msg ...')

msg1 = {"MsgType":"SimPause"}

msg2 = {"MsgType":"SimResume"}

msg3 = {"MsgType":"SimComplete"}

s.sendto(json.dumps(msg3).encode('utf-8'),target_address)

print("已发送消息到：19241")




